package com.hsnn.medstgmini.trading.pur.model.form;

import java.lang.reflect.Type;
import java.util.List;

import org.apache.commons.lang.StringUtils;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class ReturnDrugForm {

	private String delCompName;//配送企业名称
	private String delCompCode;//配送企业编码
	private String drugCode;//药品编码
	private String drugName;//通用名
	private String compName;//生产企业名称
	private String hospCode;//医疗机构编码
	
	private String hospName;
	private String hospSpelCode;
	private Integer hospStatus;
	private String hospAreaId;
	private String hospAreaName;
	private String hospArShortname;
	private String hospArFullname;
	
	private String userId;//采购用户ID
	private String name;//采购用户名称
	private String drugId;//药品ID
	private String FormName;//剂型
	private String specName;//规格
	private String factor;//转换系数
	private String unit;//单位
	private String materialName;//材质
	private String delCompId;//配送企业ID
	private String approveCode;//批号
	private String credential;//有效期
	private String proPrice;//采购价
	private String totalAmount;//采购数量
	private String compId;//生产企业ID
	private String retCount;//退货数量
	private String joinRetUser;//加入退货计划人
	private String joinRetTime;//加入退货计划时间
	private String recpInfoId;//到货信息ID
	private String retReason;//退货原因
	private String retPlanId;//退货计划ID
	private String updUser;//退货计划更新人
	private String plans;//勾选选的退货计划
	private List<ReturnDrugForm> reList;
	private Integer confirm;//提交状态0：首次提交，1：忽略已提交的继续提交
	private String submitRemark;//提交备注
	private String submitUser;//提交人
	private String retCode;//退货单号
	private String submitTime;//退货时间
	private String beginTime;
	private String endTime;
	private String delNum;//配送数量
	private String recpNum;//到货数量(订单中单个药品)
	private String unableDelNum;//无法配送数量
	private String notRecpNum;//未到货数量
	private Integer returnCount;//累计退货数量
	public String getJoinRetTime() {
		return joinRetTime;
	}
	public void setJoinRetTime(String joinRetTime) {
		this.joinRetTime = joinRetTime;
	}
	public String getNotRecpNum() {
		return notRecpNum;
	}
	public void setNotRecpNum(String notRecpNum) {
		this.notRecpNum = notRecpNum;
	}
	public String getDelNum() {
		return delNum;
	}
	public void setDelNum(String delNum) {
		this.delNum = delNum;
	}
	public String getRecpNum() {
		return recpNum;
	}
	public void setRecpNum(String recpNum) {
		this.recpNum = recpNum;
	}
	public String getUnableDelNum() {
		return unableDelNum;
	}
	public void setUnableDelNum(String unableDelNum) {
		this.unableDelNum = unableDelNum;
	}
	public String getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public String getRetCode() {
		return retCode;
	}
	public void setRetCode(String retCode) {
		this.retCode = retCode;
	}
	public String getSubmitTime() {
		return submitTime;
	}
	public void setSubmitTime(String submitTime) {
		this.submitTime = submitTime;
	}
	public String getSubmitUser() {
		return submitUser;
	}
	public void setSubmitUser(String submitUser) {
		this.submitUser = submitUser;
	}
	public String getSubmitRemark() {
		return submitRemark;
	}
	public void setSubmitRemark(String submitRemark) {
		this.submitRemark = submitRemark;
	}
	public String getPlans() {
		return plans;
	}
	public void setPlans(String plans) {
		if (StringUtils.isNotBlank(plans)) {
			Gson gson = new Gson();
			Type type = new TypeToken<List<ReturnDrugForm>>() {
			}.getType();
			reList = gson.fromJson(plans, type);
		}
		this.plans = plans;
	}
	public Integer getConfirm() {
		return confirm;
	}
	public void setConfirm(Integer confirm) {
		this.confirm = confirm;
	}
	public List<ReturnDrugForm> getReList() {
		return reList;
	}
	public void setReList(List<ReturnDrugForm> reList) {
		this.reList = reList;
	}
	public String getUpdUser() {
		return updUser;
	}
	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}
	public String getRetPlanId() {
		return retPlanId;
	}
	public void setRetPlanId(String retPlanId) {
		this.retPlanId = retPlanId;
	}
	public String getRetReason() {
		return retReason;
	}
	public void setRetReason(String retReason) {
		this.retReason = retReason;
	}
	
	public String getRecpInfoId() {
		return recpInfoId;
	}
	public void setRecpInfoId(String recpInfoId) {
		this.recpInfoId = recpInfoId;
	}
	public String getJoinRetUser() {
		return joinRetUser;
	}
	public void setJoinRetUser(String joinRetUser) {
		this.joinRetUser = joinRetUser;
	}
	public String getRetCount() {
		return retCount;
	}
	public void setRetCount(String retCount) {
		this.retCount = retCount;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDrugId() {
		return drugId;
	}
	public void setDrugId(String drugId) {
		this.drugId = drugId;
	}
	public String getFormName() {
		return FormName;
	}
	public void setFormName(String formName) {
		FormName = formName;
	}
	public String getSpecName() {
		return specName;
	}
	public void setSpecName(String specName) {
		this.specName = specName;
	}
	public String getFactor() {
		return factor;
	}
	public void setFactor(String factor) {
		this.factor = factor;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public String getMaterialName() {
		return materialName;
	}
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	public String getDelCompId() {
		return delCompId;
	}
	public void setDelCompId(String delCompId) {
		this.delCompId = delCompId;
	}
	
	public String getApproveCode() {
		return approveCode;
	}
	public void setApproveCode(String approveCode) {
		this.approveCode = approveCode;
	}
	public String getProPrice() {
		return proPrice;
	}
	public void setProPrice(String proPrice) {
		this.proPrice = proPrice;
	}
	public String getTotalAmount() {
		return totalAmount;
	}
	public void setTotalAmount(String totalAmount) {
		this.totalAmount = totalAmount;
	}
	public String getCompId() {
		return compId;
	}
	public void setCompId(String compId) {
		this.compId = compId;
	}
	public String getDelCompName() {
		return delCompName;
	}
	public void setDelCompName(String delCompName) {
		this.delCompName = delCompName;
	}
	public String getDrugCode() {
		return drugCode;
	}
	public void setDrugCode(String drugCode) {
		this.drugCode = drugCode;
	}
	public String getDrugName() {
		return drugName;
	}
	public void setDrugName(String drugName) {
		this.drugName = drugName;
	}
	public String getCompName() {
		return compName;
	}
	public void setCompName(String compName) {
		this.compName = compName;
	}

	public String getHospCode() {
		return hospCode;
	}
	public void setHospCode(String hospCode) {
		this.hospCode = hospCode;
	}
	
	public String getHospName() {
		return hospName;
	}
	public void setHospName(String hospName) {
		this.hospName = hospName;
	}
	public String getHospSpelCode() {
		return hospSpelCode;
	}
	public void setHospSpelCode(String hospSpelCode) {
		this.hospSpelCode = hospSpelCode;
	}
	public Integer getHospStatus() {
		return hospStatus;
	}
	public void setHospStatus(Integer hospStatus) {
		this.hospStatus = hospStatus;
	}
	public String getHospAreaId() {
		return hospAreaId;
	}
	public void setHospAreaId(String hospAreaId) {
		this.hospAreaId = hospAreaId;
	}
	public String getHospAreaName() {
		return hospAreaName;
	}
	public void setHospAreaName(String hospAreaName) {
		this.hospAreaName = hospAreaName;
	}
	public String getHospArShortname() {
		return hospArShortname;
	}
	public void setHospArShortname(String hospArShortname) {
		this.hospArShortname = hospArShortname;
	}
	public String getHospArFullname() {
		return hospArFullname;
	}
	public void setHospArFullname(String hospArFullname) {
		this.hospArFullname = hospArFullname;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public Integer getReturnCount() {
		return returnCount;
	}
	public void setReturnCount(Integer returnCount) {
		this.returnCount = returnCount;
	}
	public String getCredential() {
		return credential;
	}
	public void setCredential(String credential) {
		this.credential = credential;
	}
	public String getDelCompCode() {
		return delCompCode;
	}
	public void setDelCompCode(String delCompCode) {
		this.delCompCode = delCompCode;
	}
	@Override
	public String toString() {
		return "ReturnDrugForm [delCompName=" + delCompName + ", drugCode="
				+ drugCode + ", drugName=" + drugName + ", compName="
				+ compName + ", hospCode=" + hospCode + ", hospName="
				+ hospName + ", hospSpelCode=" + hospSpelCode + ", hospStatus="
				+ hospStatus + ", hospAreaId=" + hospAreaId + ", hospAreaName="
				+ hospAreaName + ", hospArShortname=" + hospArShortname
				+ ", hospArFullname=" + hospArFullname + ", userId=" + userId
				+ ", name=" + name + ", drugId=" + drugId + ", FormName="
				+ FormName + ", specName=" + specName + ", factor=" + factor
				+ ", unit=" + unit + ", materialName=" + materialName
				+ ", delCompId=" + delCompId + ", approveCode=" + approveCode
				+ ", credential=" + credential + ", proPrice=" + proPrice
				+ ", totalAmount=" + totalAmount + ", compId=" + compId
				+ ", retCount=" + retCount + ", joinRetUser=" + joinRetUser
				+ ", joinRetTime=" + joinRetTime + ", recpInfoId=" + recpInfoId
				+ ", retReason=" + retReason + ", retPlanId=" + retPlanId
				+ ", updUser=" + updUser + ", plans=" + plans + ", reList="
				+ reList + ", confirm=" + confirm + ", submitRemark="
				+ submitRemark + ", submitUser=" + submitUser + ", retCode="
				+ retCode + ", submitTime=" + submitTime + ", beginTime="
				+ beginTime + ", endTime=" + endTime + ", delNum=" + delNum
				+ ", recpNum=" + recpNum + ", unableDelNum=" + unableDelNum
				+ ", notRecpNum=" + notRecpNum + ", returnCount=" + returnCount
				+ "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((FormName == null) ? 0 : FormName.hashCode());
		result = prime * result
				+ ((approveCode == null) ? 0 : approveCode.hashCode());
		result = prime * result
				+ ((beginTime == null) ? 0 : beginTime.hashCode());
		result = prime * result + ((compId == null) ? 0 : compId.hashCode());
		result = prime * result
				+ ((compName == null) ? 0 : compName.hashCode());
		result = prime * result + ((confirm == null) ? 0 : confirm.hashCode());
		result = prime * result
				+ ((credential == null) ? 0 : credential.hashCode());
		result = prime * result
				+ ((delCompId == null) ? 0 : delCompId.hashCode());
		result = prime * result
				+ ((delCompName == null) ? 0 : delCompName.hashCode());
		result = prime * result + ((delNum == null) ? 0 : delNum.hashCode());
		result = prime * result
				+ ((drugCode == null) ? 0 : drugCode.hashCode());
		result = prime * result + ((drugId == null) ? 0 : drugId.hashCode());
		result = prime * result
				+ ((drugName == null) ? 0 : drugName.hashCode());
		result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
		result = prime * result + ((factor == null) ? 0 : factor.hashCode());
		result = prime * result
				+ ((hospArFullname == null) ? 0 : hospArFullname.hashCode());
		result = prime * result
				+ ((hospArShortname == null) ? 0 : hospArShortname.hashCode());
		result = prime * result
				+ ((hospAreaId == null) ? 0 : hospAreaId.hashCode());
		result = prime * result
				+ ((hospAreaName == null) ? 0 : hospAreaName.hashCode());
		result = prime * result
				+ ((hospCode == null) ? 0 : hospCode.hashCode());
		result = prime * result
				+ ((hospName == null) ? 0 : hospName.hashCode());
		result = prime * result
				+ ((hospSpelCode == null) ? 0 : hospSpelCode.hashCode());
		result = prime * result
				+ ((hospStatus == null) ? 0 : hospStatus.hashCode());
		result = prime * result
				+ ((joinRetTime == null) ? 0 : joinRetTime.hashCode());
		result = prime * result
				+ ((joinRetUser == null) ? 0 : joinRetUser.hashCode());
		result = prime * result
				+ ((materialName == null) ? 0 : materialName.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result
				+ ((notRecpNum == null) ? 0 : notRecpNum.hashCode());
		result = prime * result + ((plans == null) ? 0 : plans.hashCode());
		result = prime * result
				+ ((proPrice == null) ? 0 : proPrice.hashCode());
		result = prime * result + ((reList == null) ? 0 : reList.hashCode());
		result = prime * result
				+ ((recpInfoId == null) ? 0 : recpInfoId.hashCode());
		result = prime * result + ((recpNum == null) ? 0 : recpNum.hashCode());
		result = prime * result + ((retCode == null) ? 0 : retCode.hashCode());
		result = prime * result
				+ ((retCount == null) ? 0 : retCount.hashCode());
		result = prime * result
				+ ((retPlanId == null) ? 0 : retPlanId.hashCode());
		result = prime * result
				+ ((retReason == null) ? 0 : retReason.hashCode());
		result = prime * result
				+ ((returnCount == null) ? 0 : returnCount.hashCode());
		result = prime * result
				+ ((specName == null) ? 0 : specName.hashCode());
		result = prime * result
				+ ((submitRemark == null) ? 0 : submitRemark.hashCode());
		result = prime * result
				+ ((submitTime == null) ? 0 : submitTime.hashCode());
		result = prime * result
				+ ((submitUser == null) ? 0 : submitUser.hashCode());
		result = prime * result
				+ ((totalAmount == null) ? 0 : totalAmount.hashCode());
		result = prime * result
				+ ((unableDelNum == null) ? 0 : unableDelNum.hashCode());
		result = prime * result + ((unit == null) ? 0 : unit.hashCode());
		result = prime * result + ((updUser == null) ? 0 : updUser.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ReturnDrugForm other = (ReturnDrugForm) obj;
		if (FormName == null) {
			if (other.FormName != null)
				return false;
		} else if (!FormName.equals(other.FormName))
			return false;
		if (approveCode == null) {
			if (other.approveCode != null)
				return false;
		} else if (!approveCode.equals(other.approveCode))
			return false;
		if (beginTime == null) {
			if (other.beginTime != null)
				return false;
		} else if (!beginTime.equals(other.beginTime))
			return false;
		if (compId == null) {
			if (other.compId != null)
				return false;
		} else if (!compId.equals(other.compId))
			return false;
		if (compName == null) {
			if (other.compName != null)
				return false;
		} else if (!compName.equals(other.compName))
			return false;
		if (confirm == null) {
			if (other.confirm != null)
				return false;
		} else if (!confirm.equals(other.confirm))
			return false;
		if (credential == null) {
			if (other.credential != null)
				return false;
		} else if (!credential.equals(other.credential))
			return false;
		if (delCompId == null) {
			if (other.delCompId != null)
				return false;
		} else if (!delCompId.equals(other.delCompId))
			return false;
		if (delCompName == null) {
			if (other.delCompName != null)
				return false;
		} else if (!delCompName.equals(other.delCompName))
			return false;
		if (delNum == null) {
			if (other.delNum != null)
				return false;
		} else if (!delNum.equals(other.delNum))
			return false;
		if (drugCode == null) {
			if (other.drugCode != null)
				return false;
		} else if (!drugCode.equals(other.drugCode))
			return false;
		if (drugId == null) {
			if (other.drugId != null)
				return false;
		} else if (!drugId.equals(other.drugId))
			return false;
		if (drugName == null) {
			if (other.drugName != null)
				return false;
		} else if (!drugName.equals(other.drugName))
			return false;
		if (endTime == null) {
			if (other.endTime != null)
				return false;
		} else if (!endTime.equals(other.endTime))
			return false;
		if (factor == null) {
			if (other.factor != null)
				return false;
		} else if (!factor.equals(other.factor))
			return false;
		if (hospArFullname == null) {
			if (other.hospArFullname != null)
				return false;
		} else if (!hospArFullname.equals(other.hospArFullname))
			return false;
		if (hospArShortname == null) {
			if (other.hospArShortname != null)
				return false;
		} else if (!hospArShortname.equals(other.hospArShortname))
			return false;
		if (hospAreaId == null) {
			if (other.hospAreaId != null)
				return false;
		} else if (!hospAreaId.equals(other.hospAreaId))
			return false;
		if (hospAreaName == null) {
			if (other.hospAreaName != null)
				return false;
		} else if (!hospAreaName.equals(other.hospAreaName))
			return false;
		if (hospCode == null) {
			if (other.hospCode != null)
				return false;
		} else if (!hospCode.equals(other.hospCode))
			return false;
		if (hospName == null) {
			if (other.hospName != null)
				return false;
		} else if (!hospName.equals(other.hospName))
			return false;
		if (hospSpelCode == null) {
			if (other.hospSpelCode != null)
				return false;
		} else if (!hospSpelCode.equals(other.hospSpelCode))
			return false;
		if (hospStatus == null) {
			if (other.hospStatus != null)
				return false;
		} else if (!hospStatus.equals(other.hospStatus))
			return false;
		if (joinRetTime == null) {
			if (other.joinRetTime != null)
				return false;
		} else if (!joinRetTime.equals(other.joinRetTime))
			return false;
		if (joinRetUser == null) {
			if (other.joinRetUser != null)
				return false;
		} else if (!joinRetUser.equals(other.joinRetUser))
			return false;
		if (materialName == null) {
			if (other.materialName != null)
				return false;
		} else if (!materialName.equals(other.materialName))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (notRecpNum == null) {
			if (other.notRecpNum != null)
				return false;
		} else if (!notRecpNum.equals(other.notRecpNum))
			return false;
		if (plans == null) {
			if (other.plans != null)
				return false;
		} else if (!plans.equals(other.plans))
			return false;
		if (proPrice == null) {
			if (other.proPrice != null)
				return false;
		} else if (!proPrice.equals(other.proPrice))
			return false;
		if (reList == null) {
			if (other.reList != null)
				return false;
		} else if (!reList.equals(other.reList))
			return false;
		if (recpInfoId == null) {
			if (other.recpInfoId != null)
				return false;
		} else if (!recpInfoId.equals(other.recpInfoId))
			return false;
		if (recpNum == null) {
			if (other.recpNum != null)
				return false;
		} else if (!recpNum.equals(other.recpNum))
			return false;
		if (retCode == null) {
			if (other.retCode != null)
				return false;
		} else if (!retCode.equals(other.retCode))
			return false;
		if (retCount == null) {
			if (other.retCount != null)
				return false;
		} else if (!retCount.equals(other.retCount))
			return false;
		if (retPlanId == null) {
			if (other.retPlanId != null)
				return false;
		} else if (!retPlanId.equals(other.retPlanId))
			return false;
		if (retReason == null) {
			if (other.retReason != null)
				return false;
		} else if (!retReason.equals(other.retReason))
			return false;
		if (returnCount == null) {
			if (other.returnCount != null)
				return false;
		} else if (!returnCount.equals(other.returnCount))
			return false;
		if (specName == null) {
			if (other.specName != null)
				return false;
		} else if (!specName.equals(other.specName))
			return false;
		if (submitRemark == null) {
			if (other.submitRemark != null)
				return false;
		} else if (!submitRemark.equals(other.submitRemark))
			return false;
		if (submitTime == null) {
			if (other.submitTime != null)
				return false;
		} else if (!submitTime.equals(other.submitTime))
			return false;
		if (submitUser == null) {
			if (other.submitUser != null)
				return false;
		} else if (!submitUser.equals(other.submitUser))
			return false;
		if (totalAmount == null) {
			if (other.totalAmount != null)
				return false;
		} else if (!totalAmount.equals(other.totalAmount))
			return false;
		if (unableDelNum == null) {
			if (other.unableDelNum != null)
				return false;
		} else if (!unableDelNum.equals(other.unableDelNum))
			return false;
		if (unit == null) {
			if (other.unit != null)
				return false;
		} else if (!unit.equals(other.unit))
			return false;
		if (updUser == null) {
			if (other.updUser != null)
				return false;
		} else if (!updUser.equals(other.updUser))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		return true;
	}
	
}
